package com.example.demo1122.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demo1122.domain.ResponseResult;
import com.example.demo1122.entity.Class;
import com.example.demo1122.entity.Question;
import com.example.demo1122.mapper.ClassMapper;
import com.example.demo1122.service.IClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2023-12-11
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Class> implements IClassService {

    @Resource
    private ClassMapper classMapper;

    @Override
    public ResponseResult classInfo(Integer classID) {
        try {
            Class class1 = classMapper.classInfo(classID);
            return new ResponseResult(1,"success", class1);
        } catch (Exception e) {
            return new ResponseResult(0,"error", e);
        }
    }
}
